# for else
# successful = False
# for number in range(3):
#     print("Attempt")
#     if successful:
#         print("Succesful")
#         break
# else:
#     print("Attempt 3 ")

# nested loops
# for x in range(5):
#     for y in range(3):
#         print(f"({x},{y})")

# 25程序的描述方式

# 26程序顺序结构
# name = 'zhangsan'
# age = 20
# a = b = c = d = 100
# a, b, c, d = "room"
# print(a)
# print(b)
# print(c)
# print(d)
# print("---------------顺序结构-------------")
# name = input('请输入您的姓名：')
# age = input('请输入您的年龄：')
# luck_number = eval(input('请输入您的幸运数字：'))
# print('姓名:', name)
# print('年龄', age)
# print('幸运数字', luck_number)

# 26单分支结构语句

# 27双分支
# number = eval(input('请输入您的6位中将号码：'))
# # if number == 987654:
# #     print('恭喜您中奖了')
# # else:
# #     print('您未中奖')
#
# # result = '恭喜您中奖了' if number == 987654 else '您未中奖'
# # print(result)
#
# print('恭喜您中奖了' if number == 987654 else '您未中奖')

# 28多分支结构
# score = eval(input('请输入您的成绩：'))
# if score < 0 or score > 100:
#     print("您输入的成绩有误")
# elif 0 <= score < 60:
#     print("D")
# elif 60 <= score < 70:
#     print("C")
# elif 70 <= score < 80:
#     print("B")
# elif 80 <= score < 90:
#     print('A')
# else:
#     print('Good')
